﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;
using System.Runtime.Serialization;

namespace PMisuseAn.io
{
    [Serializable()]
    public class GroupFunctionDB : ISerializable
    {
        public string functionName;
        public string clusterName;


        //Default constructor
        public GroupFunctionDB(string functionName_)
        {
            functionName = functionName_;
            clusterName = MainWindow.clusterName;
        }

        //Deserialization constructor.
        public GroupFunctionDB(SerializationInfo info, StreamingContext ctxt)
        {
            //Get the values from info and assign them to the appropriate properties
            clusterName = (string)info.GetValue("projectClusterName", typeof(string));
            functionName = (string)info.GetValue("functionName", typeof(string));
        }
        
        //Serialization function.
        public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
        {
            info.AddValue("projectClusterName", clusterName);
            info.AddValue("functionName", functionName);
        }

    }
}


